<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>增加床位信息页面</title>
    <link rel="stylesheet" href="webjars/bootstrap/3.3.5/css/bootstrap.css" type="text/css">
    <script src="webjars/jquery/3.4.1/jquery.js"></script>
    <script src="webjars/bootstrap/3.3.5/js/bootstrap.js"></script>
    <style>
        form{
            margin-left: 12px;
        }
        input{
            width: 200px ;
            height: 25px;
            background-color: #f0f8ff;
            margin-bottom: 5px;
        }
        input:hover{
            border:2px #00ff00 solid;
        }
        span{
            float: left;
            width: 150px;
            height: 25px;
        }
        span.mandatory{
            float: none;
            color: red;
            margin-left: 6px;
        }
    </style>
</head>
<body>
    <legend>增加床位信息</legend>
    <form action="/addB" method="post">
        <span>档案编号：</span><input type="text" name="fnumber" id="fnumber" placeholder="请输入档案编号" required><br>
        <span>姓名：</span><input type="text" name="name" id="name" pattern="^[\u4e00-\u9fa5]{0,}$" placeholder="请输入姓名" required><br>
        <span>性别：</span><input type="text" name="sex" id="sex" list="sts"><br>
        <datalist id="sts" style="display:none;">
            <option value="男">男</option>
            <option value="女">女</option>
        </datalist>
        <span>床位使用起始日期：</span><input type="date" name="stusetime" id="stusetime" required><br>
        <span>床位使用结束日期：</span><input type="date" name="enusetime" id="enusetime" required><br>
        <span>床位详细信息：</span><input type="text" name="bedtails" id="bedtails" placeholder="请输入床位使用详细信息" required><br>
        <!--添加隐藏域-->
        <input type="hidden" name="_method" value="put">
        <button>提交添加</button>
        <button type="button" onclick="history.go(-1)">返回</button>
    </form>
    <script>
        $('[required]').after('<span class="mandatory">*</span>');
    </script>
</body>
</html>